/****************************************************************************
 *
 *  ALi (Shanghai) Corporation, All Rights Reserved. 2002 Copyright (C)
 *
 *  File: UpgradeCommand_old.h
 *
 *  Description:	define variables and functions interface about upgrade module
 *					use old protocol version
 *		         
 *  History:
 *      Date		Author      Version		Comment
 *      ====        ======      =======		=======
 *  1   2007.8.23	Tony Wang	1.0			Create
 ****************************************************************************/


#ifndef __UPGRADECOMMAND_OLD_H__
#define __UPGRADECOMMAND_OLD_H__

#include "CommDefine.h"

#ifdef __cplusplus
extern "C"
{
#endif


/********************************* Variable Define *********************************/

/********************************* Function Define *********************************/
/****************************************************************************
 *
 *  Name:		cmd_version
 *	Function:	command version return chunk info
 *	variable:	pVersion		-- protocol version (return value)
 *				chunk_info 		-- chunk info about command version (return value)
 *				
 *				
 *  
 ****************************************************************************/
unsigned int cmd_version_old(UINT32 *pVersion);

	
/****************************************************************************
 *
 *  Name:		cmd_address
 *	Function:	set start address
 *	variable:	addr -- start address
 *				
 *				
 *  
 ****************************************************************************/
unsigned int cmd_address_old(unsigned int addr); 
/****************************************************************************
 *
 *  Name:		cmd_move
 *	Function:	move chunk
 *	variable:	index -- chunk index
 *				offset - chunk offset
 *				
 *  
 ****************************************************************************/
unsigned int cmd_move_old(unsigned int index,unsigned int offset);	

/****************************************************************************
 *
 *  Name:		cmd_transferraw
 *	Function:	move chunk
 *	variable:	buffer - data buffer for transfer
 *				nBufLen	-- buffer len
 *				pfProgress 		-- callback function about progress
 *				pfUserAbort 	-- callback function about if user abort thread
 *  
 ****************************************************************************/
unsigned int cmd_transferraw_old(unsigned char *buffer, int nBufLen, 
		CALLBACK_PROGRESS pfProgress,  CALLBACK_USERABORT pfUserAbort);	



/****************************************************************************
 *
 *  Name:		cmd_burn
 *	Function:	burn flash
 *	variable:	pfProgress 		-- callback function about progress
 *				
 *								
 *  
 ****************************************************************************/
unsigned int cmd_burn_old(int nBurnSize, CALLBACK_PROGRESS pfProgress, BOOL bCareReturn);

/****************************************************************************
 *
 *  Name:		cmd_reboot
 *	Function:	reboot target
 *	variable:	
 *				
 *				
 *  
 ****************************************************************************/
unsigned int cmd_reboot_old();


#ifdef __cplusplus
}
#endif		/*	__cplusplus		*/

#endif	/* __UPGRADECOMMAND_OLD_H__ */

